Nested KVM
2014/04/24 |
Configure nested KVM. It's possible to install KVM and create virtual machines as nested KVM on KVM host.
|
|
[1] | Make sure the current settings for Nested KVM and change it if needed. |
# show the current setting ( if the result is "Y", it's OK ) root@dlp:~# cat /sys/module/kvm_intel/parameters/nested Y # if the result is "N", change like follows and reboot the system ) [root@dlp ~]# echo 'options kvm_intel nested=1' >> /etc/modprobe.d/qemu-system-x86.conf
|
[2] | Make sure the CPU model on your computer. |
[root@dlp ~]# virsh capabilities | egrep "/model|/vendor" <model>Westmere</model> # CPU model <vendor>Intel</vendor> # CPU vendor <model>apparmor</model> <model>dac</model> |
[3] | Edit the configuration of a virtual machine you'd like to nest like follows. It's OK to configure nested KVM and you can create virtual machines on the virtual machine nested. |
[root@dlp ~]#
virsh edit www # edit a virtual machine "www" # add following lines
<cpu mode='custom' match='exact'>
# CPU model <model fallback='allow'>Westmere</model> # CPU vendor <vendor>Intel</vendor> <feature policy='require' name='vmx'/> </cpu> |